Interrupt 21h Function 71A0h
Returns
information about the volume associated with the given root directory.
mov ax, 71A0h ; Get Volume Information
mov di, seg Buffer ; see below
mov es, di
mov di, offset Buffer
mov cx, BufSize ; see below
mov dx, seg RootName ; see below
mov ds, dx
mov dx, offset RootName
int 21h
jc error
mov [Flags], bx ; file system flags
mov [MaxFilename], cx ; max. filename length, excluding null
mov [MaxPath], dx ; max. path length, including null
Parameters
Buffer
Address of a
buffer that receives a null-terminated string specifying the name of the file
system.
BufSize
Size, in
bytes, of the buffer that receives the name. The buffer should include space
for the terminating null character.
RootName
Address of a
null-terminated string specifying the name of the root directory of the volume
to check. This parameter must not be NULL, or the function will fail. The
format for this parameter is C:\ .
Return Value
Clears the
carry flag, copies the file system name to the buffer given by the ES:DI
register pair, and sets the BX, CX, and DX registers to the following values if
successful:
BX |
File system
flags, which can be a combination of these values: |
FS_CASE_SENSITIVE
(0001h) |
FS_CASE_IS_PRESERVED
(0002h) |
FS_UNICODE_ON_DISK
(0004h) |
FS_LFN_APIS
(4000h) |
FS_VOLUME_COMPRESSED (8000h) |
CX |
Maximum
allowed length, excluding the terminating null character, of a filename for
this volume. For example, on the protected-mode FAT file system, this value
is 255. |
DX |
Maximum
allowed length of a path for this volume, including the drive letter, colon,
leading slash, and terminating null character. For example, on the
protected-mode FAT file system, this value is 260. |
Otherwise,
the function sets the carry flag and sets the AX register to an error value.
Remarks
This function
accesses the disk the first time it is called, but subsequent calls do not
access the disk.